Q3MemoryStorage_GetBuffer
You can use theQ3MemoryStorage_GetBuffer
function to get the data of a memory storage object.
TQ3Status Q3MemoryStorage_GetBuffer ( TQ3StorageObject storage, unsigned char **buffer, unsigned long *validSize, unsigned long *bufferSize);
storage
- A memory storage object.
buffer
- On entry, a pointer to a pointer. On exit, a pointer to a pointer to the block of memory associated with the specified storage object.
validSize
- On exit, the size, in bytes, of the valid metafile data contained in the specified buffer.
bufferSize
- On exit, the size, in bytes, of the block of memory whose address is returned through the
buffer
parameter.DESCRIPTION
TheQ3MemoryStorage_GetBuffer
function returns, in thebuffer
andbufferSize
parameters, the address and size of the block of memory currently associated with the memory storage object specified by thestorage
parameter. Note that the returned address is the address of the storage object's data, not of a copy of that data. As a result, the returned pointer may become a dangling pointer if the buffer holding the storage object's data is dynamically reallocated (perhaps because additional data was written to the object).ERRORS
kQ3ErrorAccessRestricted
kQ3ErrorInvalidObjectParameter